home *** CD-ROM | disk | FTP | other *** search
/ PC World 2007 June / PCWorld_2007-06_cd.bin / v cisle / tclock / tclocklight-040702-3.exe / source / timer / tctimer.h < prev    next >
C/C++ Source or Header  |  2004-04-01  |  2KB  |  67 lines

  1. /*-------------------------------------------
  2.   tctimer.h
  3. ---------------------------------------------*/
  4.  
  5. #define _WIN32_IE    0x0200
  6. #define _WIN32_WINNT 0x0400
  7. #define WINVER       0x0400
  8.  
  9. #include <windows.h>
  10. #include <commctrl.h>
  11. #include "resource.h"
  12. #include "../common/common.h"
  13.  
  14. #define IDTIMER_TIMER 1
  15.  
  16. /* ------ structure of timer ------ */
  17.  
  18. typedef struct _tagTimerStruct
  19. {
  20.     char  name[BUFSIZE_NAME];
  21.     int   id;
  22.     int   minute;
  23.     int   second;
  24.     char  fname[MAX_PATH];
  25.     BOOL  bRepeat;
  26.     BOOL  bBlink;
  27.     
  28.     BOOL  bDisp;
  29.     int   nDispType;
  30.     int   nUserStr;
  31.     
  32.     DWORD interval;
  33.     DWORD tickonstart;
  34. } TIMERSTRUCT;
  35. typedef TIMERSTRUCT* PTIMERSTRUCT;
  36.  
  37. /* ---------- main.c --------------- */
  38.  
  39. BOOL ExecCommandString(HWND hwnd, const char *command);
  40. PTIMERSTRUCT AddTimerStruct(PTIMERSTRUCT pArray, int len, PTIMERSTRUCT pItem);
  41. PTIMERSTRUCT DelTimerStruct(PTIMERSTRUCT pArray, int len, int index);
  42.  
  43. extern HINSTANCE g_hInst;
  44. extern char  g_mydir[];
  45. extern BOOL  g_bIniSetting;
  46. extern char  g_inifile[];
  47. extern char  g_langfile[];
  48. extern HFONT g_hfontDialog;
  49. extern HWND  g_hwndClock;
  50. extern HWND  g_hwndTimer;
  51. extern HICON g_hIconPlay, g_hIconStop;
  52.  
  53. /* ---------- dialog.c --------------- */
  54.  
  55. void OnShowDialog(HWND hwnd);
  56.  
  57. extern HWND g_hDlg;
  58.  
  59. /* ---------- timer.c --------------- */
  60. void TimerStart(PTIMERSTRUCT pTS);
  61. void ClearTimer(void);
  62. BOOL IsTimerRunning(void);
  63. void OnTimerTimer(HWND hDlg);
  64. void OnRequestMenu(HWND hDlg, BOOL bClear);
  65. void OnStopTimer(HWND hDlg, int id);
  66.  
  67.